﻿@model Dal.Entities.News
@{
    Layout = null;
    ViewBag.Nav = 6;
    ViewBag.Menu = 0;
    int ti = 1;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>病历录入</title>
    @Html.Partial("meta")
</head>
<body id="b_main">
    @Html.Partial("header")
    <!--/end #header-->
    <div id="wrapper">
        <!--holds pretty much everything-->
        @*@Html.Partial("menu")*@
        <!--/end #menu_main-->
        <div id="content">
            @Html.Partial("nav")
            @using (Html.BeginForm("manage", "news", FormMethod.Post, new { @class = "broom_form", id = "form1", style = "margin-left: 30px;" }))
            {
                if (ViewBag.Result != null)
                {
                    if (ViewBag.Result == true)
                    {
                <div class="notification confirm">
                    <em>
                        <img src="/assets/img/icons/tick_circle.png" alt="" />操作成功 </em>
                </div>
                    }
                }
                <table cellspacing="0" summary="table" class="broom_table" width="90%">
                    <tbody>
                        <tr class="odd">
                            <td>
                                课题介绍
                            </td>
                            <td>
                                @Html.TextAreaFor(i => i.KeTiJieShao, 8, 60, null)
                            </td>
                        </tr>
                        <tr class="even">
                            <td>
                                注意事项
                            </td>
                            <td>
                                @Html.TextAreaFor(i => i.ZhuYiShiXiang, 8, 60, null)
                            </td>
                        </tr>
                        <tr class="odd">
                            <td>
                                使用说明上传
                            </td>
                            <td>
                                <script type="text/javascript" src="/assets/swfupload/swfupload.js"></script>
                                <script type="text/javascript" src="/assets/swfupload/handlers.js"></script>
                                
                                <script type="text/javascript">
                                    var swfu;
                                    window.onload = function () {
                                        swfu = new SWFUpload({
                                            // Backend Settings
                                            upload_url: "/news/upload",
                                            post_params: {
                                                "ASPSESSID": "@HttpContext.Current.Session.SessionID"
                                            },
                                            // File Upload Settings
                                            file_size_limit: "10 MB",
                                            file_upload_limit: 0,    // Zero means unlimited

                                            // Event Handler Settings - these functions as defined in Handlers.js
                                            //  The handlers are not part of SWFUpload but are part of my website and control how
                                            //  my website reacts to the SWFUpload events.
                                            swfupload_preload_handler: preLoad,
                                            swfupload_load_failed_handler: loadFailed,
                                            file_queue_error_handler: fileQueueError,
                                            file_dialog_complete_handler: fileDialogComplete,
                                            upload_progress_handler: uploadProgress,
                                            upload_error_handler: uploadError,
                                            upload_success_handler: uploadSuccess,
                                            upload_complete_handler: uploadComplete,

                                            // Button settings
                                            button_image_url: "/assets/img/XPButtonNoText_160x22.png",
                                            button_placeholder_id: "spanButtonPlaceholder",
                                            button_width: 160,
                                            button_height: 22,
                                            button_text: '<span class="button">请上传说明文档</span>',
                                            button_text_style: '.button { font-family: Helvetica, Arial, sans-serif; font-size: 14pt; } .buttonSmall { font-size: 10pt; }',
                                            button_text_top_padding: 1,
                                            button_text_left_padding: 5,

                                            // Flash Settings
                                            flash_url: "/assets/swfupload/swfupload.swf", // Relative to this file
                                            flash9_url: "/assets/swfupload/swfupload_FP9.swf", // Relative to this file

                                            custom_settings: {
                                                upload_target: "divFileProgressContainer"
                                            },

                                            // Debug Settings
                                            debug: false
                                        });
                                    }
                                </script>
                                <div id="swfu_container" style="margin: 0px 10px;">
                                    <div>
                                        <span id="spanButtonPlaceholder"></span>
                                    </div>
                                    <div id="divFileProgressContainer" style="height: 35px;">
                                    </div>
                                </div>
                                @if (!string.IsNullOrWhiteSpace(Model.XiaZaiQu))
                                {
                                    <text>&nbsp;</text><a href="@Model.XiaZaiQu" target="_blank">下载使用说明文档</a>
                                }
                                @Html.HiddenFor(i => i.XiaZaiQu)
                            </td>
                        </tr>
                        <tr class="even">
                            <td>
                                公告栏
                            </td>
                            <td>
                                @Html.TextAreaFor(i => i.GongGaoLan, 8, 60, null)
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="button">
                    <div class="btn-inner">
                        <span><em>
                            <button type="submit" name="buttonsave">
                                <img src="/assets/img/icons/disk_black.png" alt="" />保存数据</button>
                        </em></span>
                    </div>
                </div>
            }
            <!--/end .tabber-->
        </div>
    </div>
    <div class="clear">
    </div>
</body>
</html>
